<?php

namespace app\controllers;
use yii\db\Query;
use yii\web\Controller;


class ApiCompanyController extends ApiBaseController {
     //公司


    //公司介绍
    public function actionIndex($id){
        $id=(int)$id;
        $list=(new Query())->select('id,name,logo,industry,number,financing,desc,website,address,lng,lat')->from('yii_company')->where(['id'=>$id])->one();
        $list['financing']=$this->GetFinancing($list['financing']);
        $list['number']=$this->GetNumber($list['number']);
        $list['industry']=$this->GetIndustry($list['industry']);
        $list['logo']=$this->GetImg($list['logo']);
        $list['image']=$this->GetCompanyImage($id);
        $list['work']=$this->GetWork($id);
        $list['address']=$list['address'];
        return json_encode($list);
    }





}
